Skip to content

fix(openai): don't auto-use Responses API on compatible apiBase#13002

Open
Solaris-star wants to merge 1 commit into
continuedev:mainfrom
Solaris-star:fix/12995-responses-api-compat-default
Open

fix(openai): don't auto-use Responses API on compatible apiBase#13002
Solaris-star wants to merge 1 commit into
continuedev:mainfrom
Solaris-star:fix/12995-responses-api-compat-default

Conversation

@Solaris-star

Copy link
Copy Markdown

Summary

Fixes #12995: using provider: openai with a custom apiBase and a gpt-5-like model name was still auto-routed to POST /responses, which many OpenAI-compatible proxies do not implement (they only have /chat/completions).

Change

  • BaseLLM.canUseOpenAIResponses now only auto-enables Responses for the official OpenAI API base (matching packages/openai-adapters shouldUseResponsesEndpoint)
  • useResponsesApi: false still hard-opts out
  • useResponsesApi: true still hard-opts in even on a custom base
  • Document the flag + custom-base behavior in the OpenAI provider docs

Test plan

  • Official OpenAI + gpt-5* still uses /responses by default
  • Custom apiBase + gpt-5.5 uses /chat/completions by default
  • Custom apiBase + useResponsesApi: true forces /responses
  • Any base + useResponsesApi: false forces /chat/completions

Fixes #12995.

Auto-routing gpt-5 / o-series models to /responses is only appropriate
for the official OpenAI API. Custom OpenAI-compatible bases typically
only implement /chat/completions. Align core canUseOpenAIResponses with
the openai-adapters guard, keep useResponsesApi true/false overrides,
and document the flag.

Fixes continuedev#12995.
@Solaris-star
Solaris-star requested a review from a team as a code owner July 20, 2026 07:23
@Solaris-star
Solaris-star requested review from sestinj and removed request for a team July 20, 2026 07:23
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 20, 2026
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Solaris-star

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow disabling Responses API for OpenAI-compatible servers with gpt-5-like model aliases

1 participant